<template>
    <div>
        <!-- 报名后未付款弹框 -->
        <apply-nopay :nopayData="{currentApply:currentApply,type:0}"></apply-nopay>
    </div>
</template>

<script>
    import applyNopay from '../../../components/home/apply_nopay.vue'
    export default {
        data() {
            return {
                type: this.$route.params.type,
                currentApply: undefined,
                isOnlinePay: 0
            }
        },
        mounted: function() {
            var that = this;
            this.common.post(this.api.getCombApply, {}, function(res) {
                var info = res.resultMap;
                // that.isOnlinePay = info.isOnlinePay;
                if (!String.isEmptyOrNUll(info.currentApply)) {
                //     if (that.isOnlinePay == 0) {
                //         if (that.type == "zjjxjy" || that.type == "tzgjxjy" || that.type == "slrybm" ||
                //             that.type == "y_zyjsry" || that.type == "y_tzg"|| that.type == "y_slry") {
                //             that.currentApply = undefined;
                //         } else {
                //             that.currentApply = info;
                //             return;
                //         }
                //     }
                //     if (that.isOnlinePay == 1) {
                //         if (that.type == "tzgbm") {
                //             that.currentApply = undefined;
                //         } else {
                            that.currentApply = info;
                            return;
                //         }
                //     }
                }
                // if (that.type == "zjjxjy") {
                //     that.common.toPage("/cont_education/apply/zyjsry_apply/zjjxjy");
                // } else if (that.type == "y_zyjsry") {
                //     that.common.toPage("/cont_education/apply/y_zyjsry_apply");
                // } else if (that.type == "y_tzg") {
                //     that.common.toPage("/cont_education/apply/y_tzg_apply");
                // }else if (that.type == "y_slry") {
                //     that.common.toPage("/cont_education/apply/y_slry_apply");
                // }else if (that.type == "tzgjxjy") {
                //     that.common.toPage("/cont_education/apply/tzg_apply/tzgjxjy");
                // } else if (that.type == "slrybm") {
                //     that.common.toPage("/study/apply/slry_apply/slrybm");
                // } else if (that.type == "tzgbm") {
                //     that.common.toPage("/study/apply/tzg_apply/tzgbm");
                // }else if (that.type == "tzg_resit") {
                //     that.common.toPage("/study/apply/tzg_resit/tzgbm");
                // }else if (that.type == "slry_resit") {
                //     that.common.toPage("/study/apply/slry_resit");
                // }else if (that.type == "jxej") {
                //     that.common.toPage("/cont_education/apply/erjian_apply");
                // }else if (that.type == "yijian") {
                //     that.common.toPage("/cont_education/apply/yijian_apply");
                // }
                if (that.type == "yjjxjy") {
                    that.common.toPage("/cont_education/apply/yijian_apply");
                }else if (that.type == "jxej") {
                    that.common.toPage("/cont_education/apply/erjian_apply");
                }else if (that.type == "y_tzg") {
                    that.common.toPage("/cont_education/apply/y_tzg_apply");
                }else if (that.type == "y_zyjsry") {
                    that.common.toPage("/cont_education/apply/y_zyjsry_apply");
                }else if (that.type == "y_slry") {
                    that.common.toPage("/cont_education/apply/y_slry_apply");
                }else if (that.type == "slrybm") {
                    that.common.toPage("/study/apply/slry_apply/slrybm");
                } else if (that.type == "tzgbm") {
                    that.common.toPage("/study/apply/tzg_apply/tzgbm");
                }
            });
        },
        methods: {

        },
        components: {
            applyNopay
        }
    }
</script>

<style>
</style>
